<?php

namespace app\api\server\user;

use app\api\model\order\OrderMusicApiModel;
use app\api\model\user\UserScoreApiModel;
use app\api\server\order\OrderMusicServer;
use app\api\ServerBase;
use think\Request;

class UserScoreServer extends ServerBase
{
    protected $model;
    /**
     * @var mixed
     */
    protected $param;
    function __construct( Request $request)
    {
        $this->request=$request;
        $this->param=$request->param();
        $this->model = new UserScoreApiModel();
    }


    function getList(){
        [$page,$limit] = $this->getPage($this->param);
        $this->param['user_id']=$this->request->user_id;
        [$list,$count] = $this->model->getApiList($this->param,[],'*',$page,$limit);
        $result['data']=$list;
        $result['count']=$count;
        $this->getMessageCode('adminMessage.success.select',2);
        return $result;
    }
}